package com.example.springboot.service;

import com.example.springboot.Mapper.BookMapper;
import com.example.springboot.pojo.BookInfo;
import com.example.springboot.pojo.User;
import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.awt.print.Book;
import java.util.List;

@Service
public class BookService implements BookMapper {
    @Autowired
    BookMapper bookMapper;
    @Override
    public List<BookInfo> getBookInfo() {
        return bookMapper.getBookInfo();
    }

    @Override
    public int addBook(BookInfo bookInfo) {
        return bookMapper.addBook(bookInfo);
    }

    @Override
    public BookInfo getBook(int id) {
        return bookMapper.getBook(id);
    }

    @Override
    public Integer query(int id) {
        return bookMapper.query(id);
    }

    @Override
    public int upadteBook(BookInfo bookInfo) {
        return bookMapper.upadteBook(bookInfo);
    }

    @Override
    public List<BookInfo> search(String bookname) {
        return bookMapper.search(bookname);
    }

    @Override
    public int selectService() {
        return bookMapper.selectService();
    }

    @Override
    public List<BookInfo> pagelist(int pageNo, int pageSize) {
        return bookMapper.pagelist(pageNo, pageSize);
    }
}
